package com.ruoyi.base.domain;

import java.math.BigDecimal;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.validator.constraints.Length;

import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 企业对象 base_company
 * 
 * @author yepanpan
 * @date 2020-11-09
 */
@ApiModel("企业实体")
@Getter
@Setter
public class BaseCompany extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增长主键ID */
    private Long id;

    /** 企业名称 */
    @Excel(name = "企业名称", prompt = "必填项")
    @ApiModelProperty("企业名称")
    @NotBlank(message="企业名称不能为空")
    private String title;

    /** 产业类型 */
    @Excel(name = "产业类型", dictType = "industry_type", prompt = "必填项")
    @ApiModelProperty("产业类型")
    @NotBlank(message="产业类型不能为空")
    private String industry;

    /** 企业类型 */
    @Excel(name = "企业类型", dictType = "company_type", prompt = "必填项")
    @ApiModelProperty("企业类型")
    @NotBlank(message="企业类型不能为空")
    private String type;

    /** 联系人 */
    @Excel(name = "联系人", prompt = "必填项")
    @ApiModelProperty("联系人")
    @NotBlank(message="联系人不能为空")
    private String linkman;

    /** 电话 */
    @Excel(name = "电话", prompt = "必填项")
    @ApiModelProperty("电话")
    @NotBlank(message="电话不能为空")
    @Length(min = 6, max = 20, message = "电话长度需要在20个字以内")
    private String phone;

    /** 邮箱 */
    @Excel(name = "邮箱")
    @ApiModelProperty("邮箱")
    @Email
    //@Size(min = 6,max = 30,message = "邮箱应该在6-30字符之间")
    private String email;

    /** 所在地区 */
    @Excel(name = "所在地区")
    @ApiModelProperty("所在地区")
    private String area;

    /** 地址 */
    @Excel(name = "地址")
    @ApiModelProperty("地址")
    private String address;

    /** 经度 */
    @Excel(name = "经度")
    @ApiModelProperty("经度")
    private BigDecimal longitude;

    /** 纬度 */
    @Excel(name = "纬度")
    @ApiModelProperty("纬度")
    private BigDecimal latitude;

    /** 距离范围 */
    @Excel(name = "考勤距离", prompt = "单位米")
    @ApiModelProperty("考勤距离")
    private Long scale;
    
    /** 状态 */
    @Excel(name = "状态", dictType = "common_status", combo = {"启用","禁用"})
    @ApiModelProperty("状态")
    @NotBlank(message="状态不能为空")
    private String status;

    

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("industry", getIndustry())
            .append("type", getType())
            .append("linkman", getLinkman())
            .append("phone", getPhone())
            .append("email", getEmail())
            .append("area", getArea())
            .append("address", getAddress())
            .append("status", getStatus())
            .append("longitude", getLongitude())
            .append("createBy", getCreateBy())
            .append("latitude", getLatitude())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("scale", getScale())
            .toString();
    }
}
